package main;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import controller.ControllerFactory;
import controller.IController;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ControllerFactory factory = new ControllerFactory();
		IController controller = factory.getNewController();
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		
		String inputLine;
		try {
			while ((inputLine = reader.readLine()) != null) {
				if (inputLine.equals("exit")) {
					controller.shutDown();
					break;
				}
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
